package cn.wolfcode.ssm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.wolfcode.ssm.domain.User;
import cn.wolfcode.ssm.mapper.UserMapper;
import cn.wolfcode.ssm.service.IUserService;
import lombok.Setter;

@Service
public class UserServiceImpl implements IUserService {
	
	//@Setter
	@Autowired
	private UserMapper userMapper;
	
	public void save(User user) {
		userMapper.save(user);
	}

	public void update(User user) {
		userMapper.update(user);
	}

	public void delete(Long id) {
		userMapper.delete(id);
	}

	public User get(Long id) {
		return userMapper.get(id);
	}

	public List<User> listAll() {
		return userMapper.listAll();
	}
}
